home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 031a / desutl20.zip / TEST.BAT < prev    next >
DOS Batch File  |  1991-11-29  |  1KB  |  51 lines

  1. @ECHO OFF
  2.  
  3. REM the following line runs windows
  4. WIN
  5.  
  6. REM the following line parses the file created by ExitW and
  7. REM modifies the environment variables or returns a DOS errorlevel
  8. REM code.  It can also do both or neither of the above.
  9. REM note that this example uses a data file contained in C:\WIN
  10. EXITWDOS C:\WIN\EXITW.DAT
  11.  
  12. REM if the errorlevel code is 200 then just go to DOS
  13. IF ERRORLEVEL 200 GOTO END
  14.  
  15. REM if the returned error level code is 3 then run autocad
  16. IF ERRORLEVEL 3 GOTO AUTOCAD
  17.  
  18. REM if the returned code is 2 then run wordperfect
  19. IF ERRORLEVEL 2 GOTO WORDP
  20.  
  21. REM if the code is 1 then run lotus
  22. IF ERRORLEVEL 1 GOTO LOTUS
  23.  
  24. REM if the errorlevel code is none of the above then just exit to DOS
  25. GOTO END
  26.  
  27. :AUTOCAD
  28. REM run autocad
  29. CD \AUTOCAD
  30. ACAD
  31. REM now call this batch file to start the cycle again
  32. WINBAT
  33.  
  34. :WORDP
  35. REM run WordPerfect
  36. CD \WP
  37. WP
  38. REM now call this batch file to start the cycle again
  39. WINBAT
  40.  
  41. :LOTUS
  42. REM run 123
  43. CD \123
  44. 123
  45. REM now call this batch file to start the cycle again
  46. WINBAT
  47.  
  48.  
  49. :END
  50. REM jumping to this point just dumps the user back to DOS
  51.